Skip to content

TPT-4474: Added support for Configurable VPC IPv4 Prefixes#712

Merged
ezilber-akamai merged 2 commits into
devfrom
proj/configurable-vpc-ipv4-prefixes
Jul 14, 2026
Merged

TPT-4474: Added support for Configurable VPC IPv4 Prefixes#712
ezilber-akamai merged 2 commits into
devfrom
proj/configurable-vpc-ipv4-prefixes

Conversation

@ezilber-akamai

Copy link
Copy Markdown
Contributor

📝 Description

Added support for new GET /vpcs/default-ranges endpoint and updated behavior of CRUD operations for VPC to support new ipv4 field

✔️ How to Test

make test-unit
make test-int TEST_CASE=test_get_vpc_default_ranges
make test-int TEST_CASE=test_vpc_with_ipv4

* Added support for Configurable VPC IPv4 Prefixes

* Fix lint

* Fix lint

* Add LA notices

* Clean up test

* Updated field name and fixed tests

* Fix lint

* Added doc link
@ezilber-akamai ezilber-akamai requested review from a team as code owners July 6, 2026 19:15
@ezilber-akamai ezilber-akamai added the project for new projects in the changelog. label Jul 6, 2026
@ezilber-akamai ezilber-akamai requested review from jriddle-linode and psnoch-akamai and removed request for a team July 6, 2026 19:15
@ezilber-akamai ezilber-akamai mentioned this pull request Jul 7, 2026
@psnoch-akamai psnoch-akamai requested review from mawilk90 and removed request for psnoch-akamai July 8, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds client/library support for configurable VPC IPv4 prefixes by introducing a new GET /vpcs/default-ranges helper and wiring an ipv4 field into VPC create/update/load flows, with accompanying unit/integration tests and fixtures.

Changes:

  • Added VPCIPv4DefaultRange model and VPCGroup.default_ranges() for GET /vpcs/default-ranges.
  • Added VPC ipv4 property support (CRUD create param + mutable property for updates via save()).
  • Expanded unit/integration coverage and updated/added fixtures for the new response shapes.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/unit/objects/vpc_test.py Extends VPC object validation to assert IPv4 range parsing.
test/unit/groups/vpc_test.py Adds unit test for vpcs.default_ranges() and validates VPC IPv4 ranges in group tests.
test/integration/models/vpc/test_vpc.py Adds integration tests for default ranges retrieval and VPC create/load/update with ipv4.
test/integration/conftest.py Adds integration fixture to create/cleanup a VPC configured with an IPv4 range.
test/fixtures/vpcs.json Updates VPC list fixture to include ipv4.
test/fixtures/vpcs_default-ranges.json Adds fixture for the new /vpcs/default-ranges endpoint.
test/fixtures/vpcs_123456.json Updates single VPC fixture to include ipv4.
linode_api4/objects/vpc.py Introduces IPv4-related JSONObject dataclasses and adds ipv4 as a mutable VPC property.
linode_api4/groups/vpc.py Extends VPC create to accept ipv4 and adds default_ranges() group method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread linode_api4/groups/vpc.py
Comment on lines +64 to +65
:param ipv4: The IPv4 address ranges for this VPC. Note that IPv4 VPCs may not currently be available to all users.
:type ipv4: List[Union[VPCIPv4RangeOptions, Dict[str, Any]]]
Comment on lines +13 to +17
@dataclass
class VPCIPv4DefaultRange(JSONObject):
"""
VPCIPv4DefaultRange represents the default settings for the internal and forbidden IPv4 address ranges in VPCs.
"""
@ezilber-akamai ezilber-akamai merged commit 50eea3e into dev Jul 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants